package cn.stronglink.asset.model;

import java.util.ArrayList;
import java.util.List;

import cn.stronglink.suite.core.base.BaseModel;

public class User extends BaseModel {

	private static final long serialVersionUID = 1L;

	private String account;
	private String password;
	private String name;
	private Integer sex;
	private String phone;
	private String email;
	private Integer status;
	private boolean isSys;
	private boolean isAdmin;
	private Long deptId;
	private List<Long> role;

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public boolean isSys() {
		return isSys;
	}

	public void setSys(boolean isSys) {
		this.isSys = isSys;
	}

	public Long getDeptId() {
		return deptId;
	}
	
	public String getDeptId_() {
		return deptId == null ? "" : deptId.toString();
	}

	public void setDeptId(Long deptId) {
		this.deptId = deptId;
	}

	public List<Long> getRole() {
		return role;
	}

	public void setRole(List<Long> role) {
		this.role = role;
	}

	public List<String> getRole_() {
		if (this.role!= null && this.role.size() > 0) {
			List<String> list = new ArrayList<String>(this.role.size());
			for (int i = 0, j = this.role.size(); i < j; i++) {
				list.add(this.role.get(i).toString());
			}
			return list;
		} else {
			return null;
		}
	}

	public boolean isAdmin() {
		return isAdmin;
	}

	public void setAdmin(boolean isAdmin) {
		this.isAdmin = isAdmin;
	}
}
